Part Number Hot Search : 
NTE2510 MUN2213 NX6414EH AD1884 24C04WE ELECT VB60100 4BILR
Product Description
Full Text Search
 

To Download AN655 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  application note st7537 power line modem application AN655/0994 by jo?l huloux and laurent hanus summary page i foreword : home automation concept ............................. 2 i.1 home automation appliances. . . . . . . . . . ............................. 2 i.2 the growth of the industry . . . . . . . . . . ............................. 2 ii introduction .................................... ................... 3 iii the electrical network ........................................... 4 iii.1 impedance of power lines . . . . . . . . . . . . . . . . . . . . . . . ................... 4 iii.2 noise. . . . . . . . . . . . ................................................... 4 iii.3 standing waves . ................................................... 5 iii.4 typical connection loss . . . . . . . . . . . . . . .......... ................... 5 iv st7537 power line modem ........................................... 6 v demoboard features .............................................. 7 vi hardware description ............................................. 7 vi.1 about cenelec specifications. . . . . . . . . . . . . . . . . . . ................... 7 vi.2 power line interface . .......................... ................... 7 vi.2.1 the line driver . .............. ......................................... 8 vi.2.2 the line interface . . . ................................................... 9 vi.2.3 the power line interface . . . . . . . . . . . . . . . . . . . ............................. 9 vi.2.4 performances of the power line interface . . . . . . . . . . . . . . . . ................... 9 vi.2.4.1 output impedance of the power line interface versus the frequency . . . . . . ....... 9 vi.2.4.2 ber test . ................. ......................................... 10 vi.2.4.3 transmit signal spectrum analysis . . . . . . . ................................ 12 vi.3 carrier detect. . . . . ............................. ................... 15 vi.4 improving sensitivity. . . . . . . . ....................................... 15 vi.5 communication with a rs232c interface . . . . . . . . . . . . . . . . . . . . . ....... 17 vi.6 demoboard communicating application . . . . . . . . . . . . . . . . . . . . . ....... 17 vi.7 overview of the st90e28 mcu . . . . . . . . . . . . . .......................... 17 vi.8 implementation of the st90e28 mcu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 vi.8.1 applicative pin configuration . . . . . . ....................................... 19 vi.8.2 power consumption . ................................... ................ 20 vi.9 power supply . . . ................................................... 22 vi.9.1 power supply features. . ............................. ................... 22 vi.9.2 power supply sizing . .......... ......................................... 23 vi.9.3 using a 2x6 v secondary voltage transformer . .............................. 23 vii pc software .................................... ................... 23 1/32
viii typical application : loadmanagement............................ 24 viii.1 protocol design . . . . . . . . . . ......................................... 24 viii.1.1 frame format . . . . . . . . . . . . . . . . . . ....................................... 24 viii.2 use of the st90e28 resources . . . . . . . . . . . . . . . ....................... 24 viii.2.1 initialization of st90e28 core and on-chip peripherals. . ....................... 25 viii.2.2 main program . . . . . . ................................................... 26 ix annexes ............................................................ 27 ix.1 annexe a : demoboard output impedance . . . . . . . . ................... 27 ix.2 annexe b : demoboard schematics & lay out . . . . . ................... 28 x references ..................................... ................... 32 i - foreword : home automation concept kenneth p. wacks, consultant to the home auto- mation industry, has written an article clearly defin- ing the concept of home automation. an extract is given below : o... over the past six years a new industry called ohome automationo has been developing. this in- dustry will create the next generation of consumer appliances. the primary value added by home automation is the integration of products and serv- ices for household use. a few small companies are marketing home automation systems. large com- panies and institutions are exploring this emerging industry to determine the market potential. a communication network in the house will provide the infra-structure for linking appliances, sensors, controllers, and control panels inside the house. this has become feasible by tailoring the commu- nications technologies developed for office auto- mation to the home environment. i.1 - home automation appliances in home automation, the term oapplianceso refers not only to the familiar kitchen, audio/video, and portable appliances, but also to the components of a heating and cooling system, a security system, and lighting features. home automation covers a broad range of products and services intended for consumer use. these items are expected to share some common attributes, among which are : - emphasis on subsystems : most appliances in houses today are self-con- tained in metal or plastic cabinets. each appli- ance operates independentlyto the others. each appliance has a different set of user control. appliances in a home automation environment are able to exchange data. this allows appliances to be grouped into subsystems. examples range from familiar subsystems, such as security and audio/video systems, to sophisticated lighting controls with preset dimming levels for banks of lights. a future subsystem might permit a washing machine or a dish-washer to request that a water heater preheat water when needed or when the energy cost is lowest. - incorporation of communications standard : some of the subsystems mentioned already ex- ist. however, the components of each are inter- connected using custom-designed technologies and custom wiring. home automation standards will relieve the manufacturer of the need to invent an ad hoc communications protocol and to pro- vide wiring for data signals. - diverse locations : once communications standards are developed, manufacturers will be able to locate components of appliances outside the cabinet. control panels could be placed where convenient for the user, not necessarelymounted on the cabinet. related appliances,such as clothes washer and a clothes dryer, could share a control panel so the knobs and dials are consistent and easier to operate. i.2 - the growth of the industry communications technology and standards play important roles in forecasting the home automation industry. however, the development of applications to use these technologies will set the growth rate that simplify routine activities, spark a desire con- sumers, or save money. thus, the growth rate of the home automation industry is ultimately determinated by the actions of appliance manufacturers. key among these de- cisions are : - adoption of an emerging communications standard : the appliance manufacturers will greatly influ- ence the establishment of a particular communi- cations standard. they may even force an amalgamation of standards from among the cur- rent contenders. st7537 - power line modem application 2/32
- create new appliances or appliances features : the development of standard communications methods can benefit manufacturersand consum- ers. the design staff would more likely be encour- aged and financed to invent appliances that depend on the exchange of data if a communica- tions infra-structure were already in the house...o ii - introduction in the latest generation of home automation sys- tems, appliances can exchange information by transmitting data over the domestic mains wiring. as a result there is no need to install extra control cables and appliances can be connected to the onetworko simply by plugging them into the nearest wall socket. apart from the obvious saving in instal- lation cost, this virtual network also makes modifi- cation and enhancement very simple since new devices just have a wall socket to be instantly connected to the network. what makes these systems feasible is a new dedi- cated modem integrated circuit, the sgs-thom- son st7537 home automation modem ic, developed specifically for this new high volume consumer market as part of a european commu- nity oesprito project on domestic automation. a typical household scenario is shown in figure 1, where various appliances, sensors, utility controls, a telephone interface and a tv screen display are all connected to the power line using power line modem. if this automated house catches fire the detector will send a warning message over the line. this will be picked up by the gas control which can cut off the gas supply, by an alarm system that can alert anyone in the house, and even by the telephone interface that can call the emergency services. the telephone interface also allows the house- holder to give instructions to appliances from out- side. you might, for example, phone home and tell the air conditioner to precool certain rooms at a specified time. where there is a limit on energy consumption, or where demand energy pricing is used (now that the technology is available this is likely to be applied extensively in future) various appliances can nego- ciate power requirements through an energy con- trol system. for example, a washing machine can agree with the heating system when it can start a cycle to avoid sudden and unnecessary peaks of demand. gas phone line phone remote system lighting television dimmer information on screen gas control alarm system water control fire detector alarm sensor washing machine temperature sensor heater energy control system mains home automation system 7537-07.ai figure 1 : typical household scenario st7537 - power line modem application 3/32
iii - the electrical network research has been done on the communication properties of the residential power circuit by j.b o'neal jr. an extract of his written work is pre- sented below : o... the primary objective in most residential power line carrier systems is to communicate information from one power outlet in a residence to another. the communication medium, therefore, consists of everything connected on power outlets. this in- cludes house wiring in the walls of the building, appliance wiring, the appliances themselves, the service panel, the triplex wire connecting the serv- ice panel to the distribution transformer and the distribution transformer itself. since distribution transformers usually serve more than one resi- dence, the loads and wiring of all residences con- nected to the same transformer must be included. iii.1 - impedance of power lines the most extensive data on this subject has been published by malack and engstrom of ibm (elec- tromagnetic compatibility laboratory), who meas- ured the rf impedance of 86 commercial ac power distribution systems in six european coun- tries (see figure 2). these measurements show that the impedance of the residential power circuits increases with fre- quency and is in the range from about 1.5 to 80 w at 100khz. it appearsthat this impedance is deter- mined by two parameters - the loads connected to the network and the impedance of the distribution transformer. the loads at a neighbor's residence can effect this impedance. wiring seems to have a relatively small effect. the impedance is usually inductive. for typical resistive loads, signal attenuation is expected to be from 2 to 40db at 150khz depend- ing on the distribution transformer used and the size of the loads. moreover, it may be possible for capacitive loads to resonate with the inductance of the distribution transformer and cause the signal attenuation to vary wildly with frequency. iii.2 - noise the principal source of noise is caused by appli- ances connected to the same transformer secon- dary to which the power line carrier system is connected. the two primary sources of noise will be triacs used in light dimmers and universal mo- tors. triacs generate noise synchronous with the 50hz power signal and this noise appears as har- monics of 50hz. universal motors found in mixers, sewing machines, and sanders also create noise, but it is not as strong as light dimmer noise, and not generally synchronous with 50hz. furthermore, light dimmers are often left on for long periods of time whereas universal motors are used intermit- tently. the figure 3 shows noise sources as well as background noise in a typical residential envi- ronment. impedance magnitude (ohm) 1000 100 10 1 0,1 0,08 0,04 0,1 0,3 0,75 2,1 5 15 30 frequency (mhz) maximum mean minimum 7537-08.ai figure 2 : aggregate european power line impedance(by malack and engstrom) st7537 - power line modem application 4/32
100 watt light dimmer reversible drill sander seving machine background 020 40 60 80 100 0 50 100 (db) (khz) 7537-09.ai figure 3 : voltage spectra for 3 universal motors compared to light dimmers operating into the 60hz power circuit (by vines, trussel, gale and o'neal jr.) iii.3 - standing waves standing wave effects will begin to occur when the physical dimensionsof the communication medium are similar to about one-eight of a wavelenght, which is about 375 and 250 meters at 100 and 150khz respectively. the length of the communi- cation path on the secondary side of the power distribution system will be determined primarily by the length of the triplex wire connecting the resi- dences to the distribution transformer.usually, sev- eral residences use the same distribution transformer. it would be rare that a linear run of this wiring would exceed 250 meters in length although the total length of branches might occasionally exceed 250 meters. thus standing wave effects would be rare at frequencies below 150khz for residential wiring...o iii.4 - typical connection loss (see figure 4) we notice two classes of value at a transmit fre- quency of about 130khz : - from 10db to 15db : in this case, the transmitter and the receiver are connected to the same branch circuit. - from 20dbto 30db : in that case, the transmission path goes from one branch circuit to another through the service panel which induces an addi- tional attenuation of 10db to 20db. therefore, the transmit range of a home automat- ion system depends on the physical topology of the electric power distribution network inside the build- ing where the system is installed. st7537 - power line modem application 5/32
typical connection loss frequency ( khz ) loss in db power line modem 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 250 300 350 400 0 -10 -20 -30 -40 -50 living room/kitchen kitchen/bedroom kitchen/bathroom living room/hall kitchen/hall 7537-10.ai figure 4 : static attenuation for several paths (by daniel chaffanjon) iv - st7537 power line modem fabricated in analog cmos technology, the st7537 transmits and receives data up to 1200bps in half duplex mode using a carrier frequency of 132.45khz, complying with europe's cenelec en 50065 standard (which specifies the use of 125khz to 140khz carrier frequencies for home automation)and us fcc regulations (which speci- fies the use of carrier frequencies lower than 450khz). frequency-shift keying is used for transmission, a fundamental design choice that makes it possible to achieve rugged transmission in a very noisy electrical environment at an affordable cost for high volume consumer markets. among the alterna- tives, amplitude-shift keying is too susceptible to noise and spread-spectrum, though theoretically more reliable, requires complex and costly circuits. moreover, field trials in a critical remote utility meter reading application have proven the dependability of the sgs-thomson approach. included on the chip are all of the functional blocks necessary for the transmission and reception of data over power lines. in addition to this ic the only external components needed are a line driver and a transformer, plus, of course, the microcontroller that prepares and interprets message data. transmit data enters the fsk modulator asynchro- nously with a nominal intra-message data rate of 1200bps. inside the modulator, the data is trans- formed into two frequencies (133.05khz for a o0o and 131.85khz for a o1o), derived from an inexpen- sive 11.0592mhz crystal. the modulated signal from the fsk modulator is filtered by a switched-capacitor bandpass filter (tx bandpass) to limit the output spectrum and to reduce the level of harmonic components. the final stage of the transmit path consists of an operational amplifier which needs a feedback signal from the power amplifier. in the receive section, the incoming signal is ap- plied at the rai input (with a typical sensitivity of 1mv rms ) where it is first filtered by a switched-ca- pacitor bandpass filter with a pass band of around 12khz, centered on the carrier frequency. the out- put of the filter is amplified by a 20db gain stage which provides symetrical limitation for overvol- tages. the resulting signal is downconverted by a mixer which receives a local oscillator synthesized by the fsk modulator block. finally, an intermediate frequency bandpass filter whose central frequency is 5.4khz improves the signal-to-noise ratio before entering the fsk de- modulator. the coupling of the intermediate fre- quency filter output to the fsk demodulator input is made by an external capacitor which cancels the receive path offset. in the st7537 there are two important additional functions: the carrier detector and the watchdog. carrier detection is needed because in practically all applications more than two appliances will be connected to the power line. before attempting to st7537 - power line modem application 6/32
transmit, an appliance must first check that there is no carrier present, and if there is, it must wait and retry later. the watchdog function is provided to ensure that the modem's control micro is functioning correctly. software in the micro must include instructions that send a pulse to the watchdog input of the st7537 at least once every 1.5s. if no negative transition is observed at this input for 1.5s a reset signal is generated to restart the micro. this watchdog monitor scheme ensures that any disruption caused by glitches are quickly corrected. v - demoboard features power line interface the power line interface has been designed in order to follow the cenelec en 50065-1 and us fcc specification. it has to amplify and filter the output signal of the st7537. test pin it is possible to program the different test modes of the st7537 with the switches sw1, sw2, sw3 and sw4 corresponding to test1, test2, test3 and test4. the most important test mode is test1 which allows continuous transmission. rs232c interface on the application board, there is an rs232c interface allowing you to debug your system. this interface is connected to the st7537 by four switches sw5, sw6, sw7 and sw8. remark : it is mandatory to provide the watchdog clock to the st7537. wrapping area you can wire your application and do its debug by connecting relevant digital signals to sw5, sw6, sw7 and sw8 (pin not used) and watchdog, mas- ter clock and rsto. vi - hardware description vi.1 - about cenelec specifications the cenelec specifications are given for an imaginary network (50 w /50 m h+5 w ) simulating the power line. this network looks like a 54 w impedance at a transmit frequency of 132.45khz. the transmitted signal is measured in relation to a reference of this network (see annexe b). with this configuration, some of the specifications are : - maximum output level : 116db m v - harmonics level of less than 46db m v mean. in this chapter, the transmitted signal is measured between the phase and the neutral of the simulated power line. then, the measured voltages are twice the ones measured with cenelec test configura- tion. thus, it is necessary to add 6db m v to the specifications given above : - maximum output level : 122db m v - harmonics level of less than 52db m v mean. henceforth, these values will be used . vi.2 - power line interface the power line interface connects the st7537 to the power lines and meets the cenelec and fcc specifications. it has the following functions : - in transmitmode : to amplify and filter the transmit signal (ato) from the st7537 - in receive mode : to provide received signal from powerlines to the receive input (rai) of the st7537 - protection against spikes and overvoltages. it is composed of a line driver and a line interface as it is shown in figure 5. pabc pabc rai pafb ato mains 50 / 60 hz st7537 line driver line interface 7537-11.ai figure 5 : power line interface description st7537 - power line modem application 7/32
3 6 7 8 9 r9 47k w r2 1k w r8 1k w r6 47k w r5 2.2 w r7 180 w q2 q1 q5 r4 2.2 w q3 r12 2.2 w r11 180 w q6 r10 2.2 w q4 c5 1 m f l1 10 m h (r = 0.8 w ) c4 6.8nf c1 1 m f c21 1 m f tr1 d1 p6ke6v8cp mains 50/60hz 0v 10v pabc rai pafb ato pabc s t 7 5 3 7 toko t1002n q1, q2, q4 = 2n2222 q3, q5, q6 = 2n2907 line driver line interface 1 2 34 6 1 2 34 6 1-2 : 20 turns 2-3 : 100 turns 4-6 : 20 turns 707vx-t1002n bottom view 7537-12.eps figure 6 : power line interface schematics in transmit mode, the power line interface has to be able to drive, via the line interface, power lines with impedances from 1 to 100 w . theline interface is not only used to put signals on the power line. it is also used as a bandpass filter, in order to reduce the harmonics of the transmit signal to a level of less than 52db m v. in receive mode, the line driver is switched off to avoid the low output impedance of the line driver attenuating the received signals and to save en- ergy costs. vi.2.1 - the line driver the line driver has to amplify the output signal (ato) of the st7537 (see figure 6). first, a normal push-pull amplifier has been set up with two bipolar transistors q4 (2n2222) and q3 (2n2907). these types of transistors (2n2222 and 2n2907) have been chosen as they are cheap and widely used. the resistors r4, r5, r10 and r12 degenerate the emitter of q5, q4, q1, q3 in order to definethe bias current of the ouput branch independently of the mismatch of the transistors. the push-pull is polar- ized with two common collector amplifiers com- posed of q1 (2n2222) and q5 (2n2907). as far as resistors r7 and r11 are concerned, their value (180 w ) has been defined to obtain the optimum performances of the amplifiers thus define the bias current of the system. the bipolar transistors q2 (2n2222) and q6 (2n2907) are used to switch off the power amplifier during the receive mode, thanks to the st7537 output signals pabc and pabc which follow the rx/tx mode. in order to avoid thermal runaways, it is mandatory to connect thermically q1/q4 and q3/q5. this is possible since the collectors of the transistors used are connected to the metal package. conse- quently, both transistors will have the same tem- perature. main characteristics of the line driver : - voltage gain = 1 - high input impedance - low output impedance st7537 - power line modem application 8/32
vi.2.2 - the line interface in order to adapt the line driver to the power line, a transformer is used (see figure 6). this trans- former has : - to isolate the rest of the interface from the power line - to put the transmit signal on the power line - to extract the received signal from the power line - to filter 50hz/60hz signal coming from the power line - to filter the harmonics of the transmit signal. the used transformer is a toko t1002n. it has two primary windings and one secondary winding. the ratios of these windings are 4:1:1 (turns). typical values of the transformer are : - l1t windings : 9.4 m h - l4t windings : 140 m h. the primary windings of the transformer are used to create a bandpass filter. the resonance fre- quency is set at the transmit frequency with c4. this capacitor is in parallel with the primary winding (1t/4t). the equivalent value for those two windings can be calculated according to : leq = l1t + l4t + 2m m = k ? ````` ` l1t ? l4t with the given values : k = 1/2 1/2 m = (9.4 m h ? 140 m h/2) 1/2 = 25.7 m h leq = l1t + l4t + 2 ? m = 200.7 m h the resonance frequency of this lc network is dependant of c4 and leq according to : fres = 1 2 p ? ````` ` leq ? c4 c4 = 1 leq ? ( 2 p ? fres ) 2 for fres = 132.45khz c4 = 7.2nf (6.8nf is chosen since it is the nearest capacitor value avail- able). the capacitor c4 must be very linear in order avoid harmonic distortion. that's why a ks (styroflex or npo ceramic capacitor) capacitor has been used. in order to filter the 50hz/60hz signal from the powerlines, c1 is used. the capacitor filters the low frequencies (50hz/60hz) and lets the high (trans- mit) frequencies pass. it is a class x2 capacitor. these capacitors have a short circuit protection, which is absolutely necessary. indeed if a short circuit in the capacitor occurs, the 50hz/60hz filter- ing is lost, and the powerline interface will be destroyed, or worse, danger might occur for per- sons working with the interface and the st7537. moreover, since the toko transformer cannot overcome higher than 800v spikes, the safety norms are not met and the capacitor c1 is required to comply with them. an additional capacitor c21 is used as the phase location is unknown. as a final protection against any possible spikes, a transil (trl 1) is used. it is a 6.8v bidirectional type. if a voltage greater than 6.8v appears, voltage between pins of the system will be set to 6.8v, protecting the other parts of the power line interface from damage. r1 is added to discharge c1 after disconnecting the interface from the powerline. without this resis- tor, c1 will not be discharged and schock hazard might occur if someone touches the powerline connector. this resistor is only useful in evaluation systems. in all other cases where disconnection from the power line never takes place, r1 can be removed, saving undesired energy loss. vi.2.3 - the power line interface the complete power line interface has been de- scribed in the two preceding parts. the interface has to be connected to the st7537 as described in figure 7. the ato and rai are the analog output and input from/to the st7537. the control of the transmit/re- ceive mode is made with pabc and pabc signals from the st7537. a high output (+10v) on pabc line selects the transmit mode, whereas a low output (0v) selects the receive mode. the opwro outputs are the power line connections. on the application board, these connections are located close to c1 and the transformer in order to avoid long tracks carrying high voltage. vi.2.4 - performances of the power line inter- face the following tests have been done on the power line interface : - output impedance of the powerline interface ver- sus the frequency - bit error rate (ber) test - spectrum analysis of the transmit signal. vi.2.4.1 - output impedance of the power line interface versus the frequency the output impedance of the power line interface is measured with an impedance analyzer as it is shown in figure 8. the board is set in receive mode. the results are given in annexe b. test equipment : 41924 lf impedance analyzer 5hz-13mhz (hewlett packard) test conditions : t = +25 c st7537 - power line modem application 9/32
st7537 power line interface impedance analyzer ato rai 7537-14.ai figure 8 : output impedance measurement configuration power line interface +10v +10v 0v 0v power line rai ato pabc pabc receive output transmit input pwr pwr mode selection 7537-13.ai figure 7 : power line interface inputs and outputs vi.2.4.2 - ber test two boards are required : one for the transmission, the other one for the reception. white noise is added to the ato transmit output of the st7537 thanks to a mixer. the aim is to meas- ure the ber under different signal/noise ratio con- ditions. the mixed signal is transmitted to the rai receive input of the modem. the digital signal injected in txd is a 2 15 -1 pseudo-random pattern long, generated by a bit error rate analyzer (with internal 1.2khz asynchronous clock). in the reception board, a 1.2khz clock (crx) is built thanks to the st7537 mclk clock. the received digital signal rxd is amplified (rxdl) and synchro- nized with the crx clock. both of them (crx and rxdl) are analyzed by the ber analyzer. the measurements are made with different rai input level. the figures 10 and 11 gives respec- tively the b.e.r with a rai input level of 10.023mv rms and 1.14mv rms . conclusion under the test conditions of the st7537 specifica- tion (rai = 10mv rms and s/n = 15db) the ber is 4.10-7. with an rai input level of 1.14mv rms the ber is around 10-4 with the same s/n ratio. there- fore, the st7537 is able to communicate with low input signal level of about 1mv rms . this test illus- trates the high sensitivity of the power line modem. in figure 10, the measured ber (with an rai input level of 10mv rms ) is compared with the theorical ber of a conventional bfsk modulator/demodu- lator. test equipment : si7703b ber analyzer rhode and schwartz noise generator test condition : t = +25 c st7537 - power line modem application 10/32
noise generator b.e.r analyzer si7703b rx clk in rx data tx data txd st7537 ato mixer st7537 rai mclk rxd rxdl crx noise reception board transmission board 7537-15.ai figure 9 : ber test configuration b.e.r 0,1 0,01 1,000e-03 1,000e-04 1,000e-07 89 10 11 12 13 14 15 b/n (db) v rai = 10.023 mvrms theorical b.e.r 1,000e-05 1,000e-06 16 st7537 b.e.r t-26c baud rate = 1200 v rai = 10.023 mvrms 7537-16.ai figure 10 : ber test for an rai input amplitude of 10.023mv rms st7537 - power line modem application 11/32
b.e.r 0,01 1,00e-03 1,000e-04 1,000e-05 10 11 12 13 14 15 16 b/n (db) v rai = 1.14mvrms st7537 b.e.r t-26c baud rate = 1200 v rai = 1.14 mvrms 7537-17.ai figure 11 : ber test for an rai input level of 1.14mv rms vi.2.4.3 - transmit signal spectrum analysis the transmit output signal of the power line inter- face is measured with the power line simulated by resistors : r = 1, 5, 10, 50, 100 w . a spectrum analyzer is used to display the output signal frequency spectrum of the power line inter- face (see figure 12). in a first design of the board, a 2.2 w resistor was used instead of the inductance l1. in this configu- ration, whatever the power line impedance, the output level was at least 106db m v up to 119db m v (see figure 13). thus no communication problems had been noticed during the test session. to improve the frequency spectrum of the transmit signal, the resistor has been replaced by an induc- tance l1 of 68 m h, 1.6 w (see figures 14 and 15). however, tests on a real site showed that the transmit level was very low with this inductance in case of low power line impedance : with an imped- ance of 1 w , the output level is 87db m v, so that communication difficulties occur. at the transmit frequency (132.45khz), the inductance looks like an impedance of about 56 w , which introduces significant attenuationson the transmit signal com- pared to those induced by the 2.2 w resistor. to improve the output signal amplitude, the induc- tance value must be modified. a compromise has to be found between filtering the pertubation volt- ages and lowering the impedance of the induc- tance at the transmit frequency. an inductance of 10 m h (0.8 w ) has been chosen which looks like an impedance of 8 w at 132.45khz frequency (see figures 16 and 17). st7537 power line interface spectrum analyzer ato r power line txd r : 1/5/10/50/100 ohm txd : o0o / o1o (0v / +5v) pafb test 1 rx/tx 7537-18.ai figure 12 : spectrum analysis configuration st7537 - power line modem application 12/32
st7537 application board with a 2.2 ohm resistor txd = ooo 125 120 115 110 105 100 1 5 10 50 100 r power line (ohm) vout (db m v) cenelec : 122 db m v) 7537-19.ai figure 13 : output transmit level (db m v) with 2.2 w resistor st7537 application board with a 68 m h inductance txd = ooo 125 120 115 110 105 100 1 5 10 50 100 r power line (ohm) vout (db m v) cenelec : 122 db m v) 95 90 85 7537-20.ai figure 14 : output transmit level (db m v) with 68 m h inductance st7537 application board with a 68 m h inductance txd = ooo 60 55 50 45 40 35 1 5 10 50 100 r power line (ohm) hs (db m v) cenelec : 52 db m v) 30 25 20 hs (db m v) 7537-21.ai figure 15 : second and third harmonics level (db m v) with 68 m h inductance st7537 application board with a 10 m h inductance txd = ooo 125 120 115 110 105 100 1 5 10 50 100 r power line (ohm) vout (db m v) cenelec : 122 db m v) 7537-22.ai figure 16 : output transmit level (db m v) with 10 m h inductance st7537 - power line modem application 13/32
st7537 application board with a 10 m h inductance txd = ooo 55 50 45 40 35 30 1 5 10 50 100 r power line (ohm) h2 (db m v) h3 (db m v) cenelec : 52 db m v) 7537-23.ai figure 17 : second and third harmonics level vout/h2 and vout/h3 variations with the 10 m h inductance versus the power line impedance are given in figure 18. st7537 application board with a 10 m h inductance txd = ooo 90 85 80 75 70 65 1 5 10 50 100 r power line (ohm) vout/h2 (db) db 60 vout/h3 (db) 7537-60.ai figure 18 : demoboard transmit performances test results (with l1 = 10 m h) cenelec specifications fcc specifications vout < 122 db m v vout < 122 db m v, h2 < 39 db m v h2 < 56 db m v mean h2 < 48 db m v (extended to 60 db m v) h3 < 49 db m v h3 < 52 db m v mean h3 < 48 db m v (extended to 60 db m v) vout/h2 > 70 db vout/h3 > 65 db conclusion with l1 = 10 m h, the required harmonics level is reached and the output voltage is smaller than 122 db m v. therefore, the power line interface is fully operating according to the cenelec and fcc specifications. moreover, for very low power line impedances, the output transmit level is high enough to ensure a good communication quality. test equipment : 3585a spectrum analyzer 20hz-40mhz (hewlett packard) test conditions : t = +25 c st7537 - power line modem application 14/32
vi.3 - carrier detect the carrier detect output (cd) is driven low when the input signal amplitude on rai is greater than v cd typically 5mv rms for at least t cd (typically 4ms). when the input signal disappears or be- comes lower than v cd , cd is held low for at least t cd before returning to a high level. v cd input is the carrier detection threshold voltage which is set internally. the graph, given in figure 19, represents the mini- mum amplitude of the received signal which can be detected (which corresponds to cd = 0) according to the frequency. thus input signals at a frequency of 133.05khz(high logic level) and 131.85khz (low logic level) can de detected at a very low level. for frequencies smaller than 129khz or greater than 150khz, the detection is made at a very high level of input signal. therefore, only significant frequen- cies received signals are detected. minimum received signal(vin) amplitude for cd=o0o ( vcd = 5.098v ) frequency (khz) vin (db m v) vin at transformer input 125 129 131 133 134.5 138.5 142.6 145 140 130 120 110 100 90 80 70 7537-61.ai figure 19 : rai input minimum detection level vi.4 - improving sensitivity in all modem, the carrier detector clamps the out- going digital data rxd when the incoming analog receive signal is below a defined level (carrier detector level 7537 typ = 5mv rms ). that means we are loosing the data when the signal is less than cd level. in the st7537, the clamping of cd on rxd is programmable thanks to txd pin. so we are able to receive data even if the incoming analog receive signal is less than 5mv. when removing the clamping of rxd by cd we are able to get rxd data without error with a receive level of 400 micro volt. as you can see on previous figure even when rai is lower than the carrier detect level we get the datas because txd = o0o. when txd = o0o and the receive signal is not one of the 7537 (e.gnoise), the rxd is random (in most configuration the rxd is at o0o). example of implementation we have seen that by programming the txd to o0o in receive mode we increase the sensitivity of the st7537 because there is no more clamping by cd. you will be able to have good communication with a receive signal of around 50db m v which means a dynamic of around 70db. because we want to get the benefit of the very good sensitivity of the st7537, we will program txd to o0o in receive mode and create by soft a frame detector. we will use the cd signal as mentionned by cenelec only when we want to transmit a frame. different software frame detector can be imple- mented depending of the ressources of your mi- crocontroller. you can program your microcontroller to go in receive frame when it received the expected byte. data data rai cd rxd 7537-40.eps figure 20 cd txd rxd clamping prog gate gate carrier detection fsk demodulator 7537-41.eps figure 21 rai cd txd rxd rand valid data o1o 7537-42.eps figure 22 st7537 - power line modem application 15/32
c1+ v+ c1- c2+ c2- v- t2out r2in vcc gnd t1out r1in r1out t1in t2in r2out 1 2 3 4 5 6 7 8 9 11 10 12 14 15 16 +5v st7537 txd rxd cd rx/tx 13 123 4 5 678 9 1. dcd 2. rxd 3. txd 4. dtr 5. gnd 6. dsr 7. rts 8. cts 9. ri max 232 (nc) + + + + + 10 m f 10 m f 10 m f 10 m f 10 m f 7537-25.ai figure 25 : connections between st7537 and rs232 interface so the preamble is for demodulator training (when you start a communication the 3 first bits are lost by the receiver) and when you will match with expected byte the microcontroller will go in receive frame routine. on the st6 microcontroller we have implemented the following frame detector. we put txd = o1o on the transmitter for around 4ms (for demodulator training) and after we send in asynchronous mode ffh following by the complete frame. on the receiver, we check that we have rxd equal to o1o for at least 7ms (we are looking for ffh), then we go in receive and we will have frame synchro- nization on the first start bit of the data. we did a trial in our lab with this system during 2 hours without having the st6 going in frame receive routine on bad datas dued to noise signal. vi.5 - communication with a rs232c interface the application board can be connected to a per- sonal computer (pc) thanks to the rs232c inter- face. as the electrical levels of the rs232 port ( 12v) do not match the electrical levels of the st7537 (ttl levels 0/+5v), a max232 is used to make communication possible. this device has two rs232 receivers to convert rs232 levels into ttl levels and two rs232 transmitters to convert ttl levels into rs232 levels. the connectionsbetween the st7537 and the rs232 interface are given in figure 25. not all the pins from the rs232 port are used. the rxd, txd and carrier detect (cd) signals are directly converted. the request to send (rts) line is used to set the st7537 in receive or transmit mode, but also to give the pc a clear to send (cts) signal. the data set ready (dsr) line is connected to the data terminal ready (dtr) line. this simulates the transmission of the dsr signal by the power line modem when the pc is ready. the ri output of the pc is only used for telephone network modems, and therefore it is not connected. if the rs232 port of the pc is used, it is necessary to provide the board with a watchdog clock (e.g : 1khz) in order to get the pc communi- cation working. a suggested clock generator is given figure 26. it uses a ne555 timer working in astable mode. the output high time of the clock is : t h = 0.693*(r1 + r2)*c1 the output low time of the clock is : t l = 0.693*(r2)*c1 thus the total period t is : t = t h +tl the frequency of oscillation is : f = 1/t = 1/(t h +t l ) calculations provides the following results : r1 = 1k w , r2 = 100k w , c1 = 7nf. rxd preamble expected byte random datas frame 7537-43.eps figure 23 rxd random datas data o1o ffh frame 7537-44.eps figure 24 st7537 - power line modem application 16/32
ne555 5v 0v 8 1 r1 r2 c1 7 6 discharge threshold 4 reset 2 trigger wd 3 out 1 k ohm 100 k ohm 7nf c 0.01 microf 5 control voltage 7537-26.ai figure 26 : watchdog clock rs232c communication problem we have discovered that with some computer the communication program does not work correctly. in some new pc generation the uart is sensitive to the rxd jitter and then shows characters errors on plm communication. the following hardware avoid the jitter on rxd for the uart of the pc. 1 2 3 4 5 6 7 8 9 16 11 12 14 14 7 3 5 v cc reset 1.2k w 100nf 10k w 16.4k w 33nf rxds to rs232c bclkr rxd from st7537 7 4 h c 7 4 b c d 4 0 4 6 b c n 7537-45.eps figure 27 rxd bclkr rxds 7537-46.eps figure 28 after power-up the 7537 demoboard, you have to reset the receive recovery block. before doing this extra hardware we recommend you to test your pc with the new program and if there are time to time some errors the hardware has to be adapted as shown above (you can use bclkr for the watchdog clock). vi.6 - demoboard communicating application the st7537 power line modem enables you to design ocommunicatingo appliances, which meet your specific requirements and comply with the cenelec specifications. equipped with a single low-cost st90e28 microcontroller, it makes it pos- sible to build a osmarto home network, where each device is able to use any information required either if it is local (sensors) or remote (inside any other communicating appliance). this paragraph is intended to provide design basics for the implementation of the st90e28 on the st7537 demoboard. vi.7 - overview of the st90e28 mcu the st90e28 microcontroller chosen to equip the st7537 demoboard is a 16kbyte program memory eprom version with 256 bytes of ram and 256 bytes of register file. within this file, 224 gen- eral purpose registers are available as ram, accu- mulators or index pointers, allowing code efficiency. this mcu has an internal clock gener- ator, a 16-bit watchdog timer for system integrity, a powerful serial communications interface (sci) with included baud rate generator and outstanding character search capability, and a 16-bit multifunc- tion timer for complex user applications; it provides a reset input and up to 36 input/output pins, includ- ing 7 external interrupts and a non-maskable inter- rupt. most of the instructions take 14 clock cycles: with a clock frequency of 11.0592mhz, one instruction lasts about 90ns. connected to the st7537, the microcontroller has to deliver a maximum bit rate of 1200 bauds: one bit is at least 833 m s long. st7537 - power line modem application 17/32
vi.8 - implementation of the st90e28 mcu two configurations have been set up, one for the slave appliances, and one for the master system. both versions will have their address initialized in the software in this first release. besides, they use one data output to display information about the main program execution by means of a led: you know that the main program is running well, when this led is blinking as the appliance is powered on. the main differences between the two controllers are the input/ouput facilities. the slave configuration provides an ouput that switches a load. this load will be simulated by a led (see figure 29). the master configuration provides a 3-bit com- mand input to control the slaves. this command will be simulated by a keyboard : one key is avail- able for each slave, and one specific key enables the user to supervise all the slaves inside a room at once. this configuration also uses a 3-bit data output to let you know whether a particular slave is on, or whether the room is lit up. this information will be displayed by one led attached to the key dedicated to a particular device (see figure 30). all the slaves addresses will be stored in the master version of the software. furthermore, both configurations need a 7 bit data exchange with the st7537 : clock, transmit data, receive data, reset, rx/tx control lines (see fig- ure 31). no external component is needed to inter- face the microcontroller with the power line modem, allowing cost savings. - oscin (pin 2) : the mcu oscillator is driven with the plm master clock, so that no additional crys- tal is needed.in this case, the oscillator output pin must stay unconnected. - port 5 bit 1 (pin 42) : this output bit provides the plm watchdog input with negative transitions, before the timeout end is reached. the watchdog pulses must be at least 500ns wide with a period of at least 800 m s and up to 1.5s. - port 5 bit 0 (pin 43) : this output controls the rx/tx mode. when this bit is 0, the transmit mode is set, otherwise the receive mode is selected. remember that the st7537 switches automat- ically in the receive mode, when this bit is held at 0 longer than 1s. - int1 (pin 26) : the plm carrier detect signal channels through this external interrupt input pin, which is triggered on falling edge. on signal de- tection, the carrier detect output is driven low and generates an interrupt request. - sout (pin 30) : the microcontroller provides the st7537 with tx data by means of the sci output. - sin (pin 31) : the st7537 providesthe microcon- troller with rx data through the sci input. - nmi (pin 18) : the plm reset output signal acts as an mcu external watchdog, in order to detect hardware or software failures. this signal chan- nels through the mcu external non maskable interrupt input pin, which is triggered on rising edge. when the power supply is too low or when no negative transition occurs on the plm watch- dog input for more than 1.5s, the reset ouput is driven high and generates a top level interrupt request, which resets the microcontroller. as for the mcu internal watchdog timer, the watchdog mode is disabled, so that a second 16-bit pro- grammable timer is available for customer appli- cations. st9 7 st7537 pli ac power line 50/60 hz mcu main program plm load 7537-28.ai figure 29 : slave configuration st7537 - power line modem application 18/32
st9 7 st7537 room command pli ac power line 50/60 hz mcu load_1 load_2 load_1 load_2 room status main program plm 7537-29.ai figure 30 : master configuration st9 st7537 rsto rxd txd oscin nmi sin sout p51 p50 int1 18 19 20 21 22 23 24 2 42 43 26 30 31 18 mclk wd rx/tx cd 7537-30.ai figure 31 : interface between st7537 and st90e28 vi.8.1 - applicative pin configuration -v ss (pin 1) : digital circuit ground -v dd (pin 21) : main power supply voltage +5v. a decoupling capacitor of 47 m f is connected be- tween v dd and v ss pins. the v dd of the micro- controller should be connected also to the dv cc of the st7537 in order to reference the digital level of the st7537. - reset (pin 3) : this input is active low. to restart the microcontroller, the reset key has to be pressed (see figure 32). a capacitor (2.2 m f) will keep the input low for a minimum startup period, whereas a pull-up resistor (100k w ) will keep it high for normal operation. st9 reset 100k +5v reset 2.2 m f + key 7537-31.ai figure 32 : reset command st7537 - power line modem application 19/32
st9 pxx r 7537-32.ai figure 33 : display output - display output : light emitting diodes are used to display data. the maximum current provided by each output pin is 0.8ma. therefore the serial resistor r has a minimum value of 4.7k w (see figure 33 : current = (4.2-0.6)/4.7e3 = 0.77ma). the slave configuration uses 2 display output pins. port 2 bit 3 (pin 25) : blinking led port 2 bit 5 (pin 27) : load (slave led) the master configuration uses 4 display output pins. port 2 bit 3 (pin 25) : blinking led port 2 bit 5 (pin 27) : load 1 status port 2 bit 6 (pin 28) : load 2 status port 5 bit 5 (pin 38) : room status - keyboard input : switch keys are used to enter commands. the keyboard pin is active high (see figure 34). apull-down resistor of 10k w keepsthe input low, whereas a key press holds it high for active operation. the master configuration uses 3 keyboard input pins. port 5 bit 2 (pin 41) : load 1 command port 5 bit 3 (pin 40) : load 2 command port 5 bit 4 (pin 39) : room command st9 pxx 10k +5v key 7537-33.ai figure 34 : keyboard input vi.8.2 - power consumption the power consumption of each configuration has been measured. both master and slave boards were connected to the ac power mains : the slave led and all master status leds are switched on by pressing the master room key (worst case simula- tion). the current consumption is measured with a digit- izing oscilloscope (channel 2) by means of a serial resistor, which value is small enough to avoid big supply voltage drops (about 1 w typically). a dual tracking power supply provides each board with the same power voltage, which value is dis- played on a multimeter. test equipment : fluke 45 multimeter, tektronix tds460 digitizing oscilloscope test conditions : r = 1.04 w , valim = +10.006 v t = +25 o c - slave board : the oscilloscope is triggered on the falling edge of the carrier detect (cd) signal displayed on channel 1 (see figure 35). there- fore, the current consumption is displayed on channel 2 in receive mode on stand-by (cd = 1) and active (cd = 0) states. current consumption (rx mode) :+146ma rms power consumption : (+10.006v - 1.04 w ? 146ma) ? 146ma = +1.44w slave board current consumption test results (see figure 36) channel 1 : carrier detect signal channel 2 : supply current - master board : the oscilloscope is triggered on the falling edge of the rx/tx signal on channel 1 (see figure 37). the current consumption is displayed on channel 2 in both receive and transmit modes. current consumption : rx mode +160ma rms tx mode +230ma rms power consumption : rx mode (+10.006v - 1.04 w ? 160ma) ? 160ma = +1.57w tx mode (+10.006v - 1.04 w ? 230ma) ? 230ma = +2.25w master board current consumption test results (see figure 38) channel 1 : rx/tx signal channel 2 : supply current st7537 - power line modem application 20/32
multimeter oscilloscope alim slave +v -v +10v 0v +10v 0v cd ch1 ch2 r master ac power line 50/60 hz vac vac tx mode 3 shots 7537-34.ai figure 35 : slave board current consumption test t 1 2 tek stopped 33 acquisitions [] t ch2 rms 145.68 mv ch2 max 172.4 mv ch2 mean 145.44 mv ch2 min 119.6 mv ch1 5.00 v ch2 20.00 mv m 100 ms ch1 3.2 v 7537-35.ai figure 36 : slave board current consumption test results st7537 - power line modem application 21/32
multimeter oscilloscope alim slave +v -v +10v 0v +10v 0v rx/tx ch1 ch2 r master ac power line 50/60 hz vac vac rx mode 7537-36.ai figure 37 : master board current consumption test t 1 2 tek stopped 33 acquisitions [] t ch2 rms 183.78 mv ch2 max 268.2 mv ch2 mean 180.84 mv ch2 min 119.4 mv ch1 5.00 v ch2 30.0 mv m 100 ms ch1 3.1 v 7537-37.ai figure 38 : master board current consumption test results v.9 - power supply v.9.1 - power supply features the power supply features are : - one reference voltage of 10 v dc - output current of 400 ma the 5 v dc voltage needed for the numeric part of the application is provided by a voltage regulator lm 7805, which already exists on the board. the power supply schematic is given in figure 39 : the lm317t regulator is ajustable between 1.2v and 37v thanks to the r1 & r2 resistors. it could be replaced by a +10v regulator. st7537 - power line modem application 22/32
lm 317t c1 4700 m f c2 100nf c3 1 m f r1 220 r2 5k + 220v +10 v ov uca 7537-38.ai figure 39 : power supply schematics v.9.2 - power supply sizing the rectified voltage between pins of the capacitor c1 is shown in figure 40 : uca = transformer secondary voltage (v rms ) ucc = voltage between pins of the capacitor c1 urtt = ripple voltage u = minimum voltage which has to exist between input and output of the voltage regulator us = output power supply voltage ud = rectifier diodes voltage drop i = output power supply current hypothesis : - i = 400ma - umin = 3v -ud=1v the minimum voltage the transformer has to pro- vide is : uca = (us + umin + urtt + 2ud) / 2 the ripple voltage is : urtt = 10 * i / c1 (with i in ma and c1 in m f) v t 1.414*ucarms - 2*ud uoutput umin urtt 10 v 7537-39.ai figure 40 : rectified voltage parameters v.9.3 - using a 2x6 v secondary voltage trans- former the transformer must be able to supply i = 400ma, so that a 5 va transformer is required. the maximum value of urtt is : urtt max = 2*uca - us - umin - 2*ud = 2v ? c1 min = 10*i / urtt max c1 min = 2000 m f we choose a c1 capacitor value of : 4700 m f the maximum voltage vmax which can be applied between c1 pins has to be higher than the maxi- mum secondary voltage of the transformer. there- fore, with a safety margin of 25% : vmax = (2 * uca) * 1.25 = 21.2v the maximum power dissipated by the voltage regulator is : pd = u * i u = 2*uca - us - urtt - 2*ud urtt = (10 * 400) / 4700 = 0.85v ? pd = 1.6w in short, the power supply sizing is : - secondary voltage of the transformer : 2x6v - 5 va transformer - c1 = 4700 m f with a maximum voltage of 25v between its pins. vii - pc software with the application board, we provide you a com- munication program written in turbo c language which allows : - to drive the rs232 interface - to transmit data via power lines thanks to the st7537 - to receive data from power lines thanks to the st7537 - to process data - to run character error test. it is possible to transmit : - characters - text ( maximum 80 characters ) - hexadecimal data ( maximum 64 bytes ) - file. the communication program allows you to run different types of communication : - communication between 2 computers. - communication between 2 ports com on the same computer. st7537 - power line modem application 23/32
viii - typical application viii.1 - protocol design the software described in the following parts pro- vides you with a simple efficient protocol kernel, which is fully interrupt handled and uses almost no cpu time. therefore it enables you to develop friendly interactive applications with a short re- sponse time. this protocol uses a packet encapsulation mecha- nism with two level error detection capability, both for the packet level and for the byte level. during reception, burst noise can affect the communica- tion channel, so that a frame check sum is used to detect excessive errors. in many cases, impulsive noise may cause unpredictable data loss without modifying the frame check sum. therefore, each byte is transmitted and received in an asynchro- nous mode inside a 11-bit type word including a start bit, onestop bit, and an odd parity bit to ensure byte integrity. viii.1.1 - frame format (see figure 41) each frame consists of a preamble, a header, a house address, a link control, a source address, a destination address, a data block, and a frame check sum. the preambule is 8-bit field with a fixed value ffh: it trains the fsk demodulator, allows a good uart synchronisation for next character. the header consists of a 8-bit pattern aah chosen with a low probability of wrongly detecting noise or preamble as the header. on a message reception, a match- ing test is run on the house address field to over- come perturbations coming from a neighbouring home network. viii.2 - use of the st90e28 resources - the watchdog/timer : the watchdog mode is disabled and the timer is operated in continuous mode. on each timer interrupt request, network access parameters, keyboard delay time, common sys- tem clock parameters are updated. besides, the st7537 watchdog input is reset. - the serial communication interface (sci) : the sci is configured in asynchronous mode to exchange data between the power line modem and the microcontroller. every character sent (or received) by the sci has the following format: 1 start bit, 8 data bits, 1 parity bit (odd parity se- lected), 1 stop bit. the transmit rate is 1200 bauds. to start transmitting a frame, the transmitter buff- er register is loaded with the preambule value ffh in order to run the sci. each data byte end of transmission results in the generation of an txhem (transmitter buffer empty) interrupt re- quest to load the next transmit data byte. an outstandingcharacter search is performed to detect the header of an incoming frame (see figure 42). this is achieved by comparing each received data byte to the content of the data compare register. if the incoming character matches, an rxa (receiver address match) inter- rupt is requestedto enablethe analysisof the next data frame fields. every time the reception of a data byte is completed, a rxd (receive data) interrupt request is generated to store the re- ceived data byte. preambule header house address link control source address destination address data frame check sum 7537-54.ai figure 40 : frame fields st7537 - power line modem application 24/32
data data data data match data data data data interrupt interrupt interrupt interrupt char match interrupt 7537-55.ai figure 42 : character search function - the register file (see figure 43) : among the 224 available global purpose regis- ters, 16 registers are reserved as a transmit frame buffer, another group of 16 registers is reserved as a receive frame buffer, 48 registers are dedi- cated to the protocol kernel, and another group of 48 registers is allocated to the system & user stacks, which leaves 96 registers for storage of applicative values. - the input/outputports : two of the port pins must be used for the rx/tx (p5.0) and wd (p5.1) output signals. four must be initialized as alternate function for the rsto (p2.0), cd (p2.4), rxd (p3.6) and txd (p3.7) signals. details concerning the initialization of these ports are given in next section. xmit buffer recv buffer protocol kernel application user stack system stack system page 00h 0fh 10h 1fh 20h 4fh 50h afh b0h bfh c0h dfh e0h efh f0h ffh 7537-56.ai figure 43 : register file map viii.2.1 - initialization of st90e28 core and on- chip peripherals - core initialization : the user and system stacks are set up in the internal register file. the internal clock frequencyis set to 11.0592mhz.the priority level of the main program is set to 7 (lowest), whereas the non-maskable interrupt (rsto sig- nal) has the top level priority. - initialization of the input/output ports : only six input/outputs are required to exchange data be- tween the st7537 and the st90e28. the corre- sponding pins are initialized as follows : nmi (port 2 bit 0) alternate function, open drain, ttl cd (port 2 bit 4) af, op, ttl rxd (port 3 bit 6) af, op, ttl txd (port 3 bit 7) alternate function, push pull, ttl rx/tx (port 5 bit 0) output, push pull, ttl wd (port 5 bit 1) out, pp, ttl the nmi pin is programmed rising edge sensitive, whereas the cd/ input signal triggers an external interrupt request on a falling edge (int1 pin) with a priority level set to 1. as for the applicative features, each port pin is initialized as follows : display pin output, push pull, ttl keyboard pin input, tristate, ttl - timer : the watchdog mode is disabled. continu- ous mode is selected with count down from a fixed value of 767, each underflow resulting in an inter- rupt request and reload of the fixed initial counter value. the internal clock rate, prescaler and initial count value are chosen to give an interrupt re- quest every 555.56 m s (1.8khz = 36*50hz = 30*60hz). the timer counter is loaded with the value 767 to complete an end of count every 555.56 m s. on each counter underflow an inter- rupt request (int0) is generated with a priority level set to 0 (high). - serial communication interface : the asynchro- nous mode is selected. the serial interface pro- grammed characteristics are : 8-bit word length, st7537 - power line modem application 25/32
odd parity generation and detection, 1 stop bit generation, aah header search. in this mode, each data bit is sampled 16 times, so that each data bit period will be 16 sci clock periods long. the counter of the baud rate generator is loaded with the fixed value 576 to set the sci clock rate to 16*1200 = 19200 bauds. the priority level of all sci interrupts (rxa, rxd, txhem) is set to 1. viii.2.2 - main program the main is automatically entered on system reset, and first initializes the internal clock, stacks, ports, register file, serial communication interface, and timer. then the timer starts counting down towards zero from an initial value of 767. each time the counter clears to zero, an high priority interrupt request will be generated, which will initiate an update of the network access parameters. the main program loops around the main modules. main mcu initialization enable interrupts keyboard tx_application background time base entered on system reset 7537-57.ai figure 44 : main program flow chart st7537 - power line modem application 26/32
annexe a : demoboard output impedance 160 140 120 100 80 60 40 20 0 st7537 demo board impedance module (ohm) 50 100 150 frequency (khz) 7537-58.ai figure 45 100 80 60 40 20 0 -20 -40 -60 -80 0 20 40 60 80 100 120 140 160 i m a g i n a r y real 150 khz 7537-59.ai figure 46 st7537 - power line modem application 27/32
annexe b : demoboard schematics & lay out 2 4 5 14 15 16 17 26 27 28 1 2 3 5 6 7 89 10 11 12 13 14 3 6 7 8 9 10 11 12 13 c1+ v+ c1- c2+ c2- t20 r2i r20 t2i t1i r10 r1i gnd v cc 16 15 v- t10 c19 10 m f c18 10 m f 0v c17 10 m f c16 10 m f 0v 1 6 2 7 3 8 4 9 5 p3 subd9 (female) 2 4 1 3 5 7 6 8 1 18 19 20 21 22 23 24 25 sw5 3 1 2 sw6 3 1 2 sw7 3 1 2 sw8 3 1 2 v cm mclk wd rx/tx cd txd rxd rsto dv cc xt1 11.0592mhz av ss dv ss xtal1 xtal2 c9 100nf demi ifo txfi av dd dv dd rai pafb ato pabc pabc test1 test2 test3 test4 st7537 sw1 2 1 3 sw2 2 1 3 sw3 2 1 3 sw4 2 1 3 +5v c20 10 m f c2 22pf c3 22pf c10 2.2 m f c7 100nf 0v ld1 ld2 ld3 ld4 r19 10k w r18 10k w r17 10k w r16 10k w c11 2.2 m f c8 100nf r14 619 w (1%) r15 9.09 w (1%) 0v r3 10k w (1%) r8 1k w tp2 tp1 tp4 tp3 r11 180 w r9 47k w r12 2.2 w r2 1k w q5 2n2907 r6 47k w r7 180 w r5 2.2 w q4 2n2222 q6 2n2907 q1 2n2222 q3 2n2907 r10 2.2 w r4 2.2 w c5 1 m f l1 10 m h (r = 1.6) 1 2 3 0v c14 c15 10 m f 16v +5v c13 10 m f 16v c12 l7805 ic3 +10v d1 r1 1m w c1 470nf tr1 c4 6.8nf 100nf 100nf p2a p3a p3b p2b max232cpe 0v ic2 tp5 +5v c6 100nf q2 2n2222 1 2 34 6 1-2 : 20 turns 2-3 : 100 turns 4-6 : 20 turns 707vx-t1002n bottomview 1 2 3 4 6 7537-74.eps figure 47 : application board 7537 demo1 st7537 - power line modem application 28/32
r f3 f4 f7 f6 ic3 c18 c19 c20 c16 c17 r19 r18 r17 r16 ld4 ld3 ld2 ld1 sw5 sw6 sw7 sw8 ic2 c14 c13 c15 c9 c6 c7 c8 c10 c11 c12 p2 q6 q1 q4 d1 q2 q5 q3 c5 c4 l1 c21 r2 tr1 p1 r1 c1 r14 xt1 tp1 tp2 tp3 tp4 sw1 sw2 sw3 sw4 ic1 c2 c3 r15 r3 r5 r12 r4 r10 r7 r6 r8 r9 r11 tp5 p3 5 6 1 9 7537-75.eps figure 48 : layout bill of materials item qty. reference part item qty. reference part 1 2 c11,c10 2.2 m f 18 1 r14 619 (1%) 2 6 c7,c6,c8,c9,c12,c14 100nf 19 4 r19, r16, r17, r18 10k w 3 4 ld4,ld1,ld2,ld3 led 20 5 c16, c17, c18, c19, c20 10 m f 4 1 ic1 st7537 21 1 c21 15nf 58 sw8, sw1, sw2, sw3, sw4, sw5, sw6, sw7 22 2 pico1, pico2 pico 6 1 xt1 crystal 23 2 c13, c15 10nf/16v 7 2 r8, r2 1k w 24 1 l1 10 m h (r=0.8) 8 2 r6, r9 47k w 25 1 d1 diode 9 3 q2, q1, q4 2n2222 26 5 tp2, tp1, tp3, tp4, tp5 point 10 3 q3, q5, q6 2n2907 27 1 p3 subd9 (female) 11 1 c4 6.8nf 28 1 p2 alim 12 1 c1 470nf 29 1 p1 alim+ 13 1 r1 1m w 30 1 tr1 toko 14 4 r4, r5, r10, r12 2.2 w 31 1 r15 9.09k w (1%) 15 2 r11, r7 180 w 32 1 r3 10k w (1%) 16 1 ic2 max232cpe 33 2 c2, c3 22pf 17 1 ic3 lm7805 34 1 c5 1 m f st7537 - power line modem application 29/32
st90e28 u1 txd rsto 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 r19 100k w c23 2.2 m f +5v 0v +5v 0v c22 47 m f wd rx/tx mclk rxd r20 4.7k w ld7 0v r21 4.7k w ld5 0v cd sw9 reset p00 p01 p02 p03 p04 p05 p06 p07 p10 p11 p12 p13 p14 p15 p30 p31 p32 p33 p34 p35 p36 p37 as ds rw p50 p51 p52 p53 p54 p55 gnd v cc reset xtalin xtalout p20 p21 p22 p23 p24 p25 p26 p27 r23 4.7k w ld6 +5v r24 10k w 0v sw12 room sw11 load_2 sw10 load_1 r24 10k w r24 10k w r22 4.7k w 0v ld8 7537-77.eps figure 49 : master configuration board st7537 - power line modem application 30/32
st90e28 u1 txd rsto 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 r19 100k w c23 2.2 m f +5v 0v +5v 0v c22 47 m f wd rx/tx mclk rxd r20 4.7k w ld6 load 0v r21 4.7k w ld5 load 0v cd sw9 reset p00 p01 p02 p03 p04 p05 p06 p07 p10 p11 p12 p13 p14 p15 p30 p31 p32 p33 p34 p35 p36 p37 as ds rw p50 p51 p52 p53 p54 p55 gnd v cc reset xtalin xtalout p20 p21 p22 p23 p24 p25 p26 p27 7537-78.eps figure 50 : slave configuration board st7537 - power line modem application 31/32
references 1. wacks (kenneth p.) utility load management using home automation, ieee transactions on consumer electronics, vol 37, n 2, pp 168-174, may 1991. 2. o'neal (j.b, jr.), the residential power circuit as a communication medium, ieee transactions on consumer electronics, vol ce-36, n 3, pp 567-577, august 1986. 3. vines (roger m.), trussel (jel), gale (louis j.), noise on residential power distribution circuits, ieee transactions on electromagneticcompatibility, vol emc-26, n 24, pp 161-168, november 1984. 4. lewart (cass), modem handbook for the communications professional, elsevier science publishing co., 1987. 5. sgs-thomson microelectronics, st9 family 8/16 bit mcu programming manual, 1991, st9 serie. 6. sgs-thomson microelectronics, st9 family 8/16 bit mcu technical manual, 1991, st9 serie. 7. borland, turbo c : user's manual, 1988. 8. chaffanjon d., courants porteurs sur installation lectrique d'un logement (aspects physiques). information furnished is believed to be accurate and reliable. however, sgs-thomson microelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. no licence is granted by implication or otherwise under any patent or patent rights of sgs-thomson microelectronics. specifications mentioned in this publication are subject to change without notice. this publication supersedes and replaces all information previously supplied. sgs-thomson microelectronics products are not authorized for use as critical components in life support devices or systems without express written approval of sgs-thomson microelectronics. ? 1995 sgs-thomson microelectronics - all rights reserved purchase of i 2 c components of sgs-thomson microelectronics, conveys a license under the philips i 2 c patent. rights to use these components in a i 2 c system, is granted provided that the system conforms to the i 2 c standard specifications as defined by philips. sgs-thomson microelectronics group of companies australia - brazil - china - france - germany - hong kong - italy - japan - korea - malaysia - malta - morocco the netherlands - singapore - spain - sweden - switzerland - taiwan - thailand - united kingdom - u.s.a. st7537 - power line modem application 32/32


▲Up To Search▲   

 
Price & Availability of AN655

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X